package com.hzhq.contract.service;

import com.hzhq.contract.bean.dto.ContractTypeDTO;
import com.hzhq.contract.bean.entity.ContractType;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.query.Query;

import java.util.List;

/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/18 21:53
 * @desc:
 */
public interface ContractTypeService {

    List<ContractTypeDTO> getAllList();

    Page<ContractTypeDTO> getAllPage(Integer currentPage, Integer pageSize);

    Page<ContractTypeDTO> searchAllPageByQuery(Query query, Integer currentPage, Integer pageSize);

    ContractTypeDTO getOneById(String id);

    ContractTypeDTO getOneByName(String name);

    ContractTypeDTO getOneByCode(Integer code);

    ContractTypeDTO save(ContractTypeDTO contractTypeDTO);

    String deleteById(String id);

    String deleteByName(String name);

    String deleteByCode(Integer code);

    Page<ContractTypeDTO> searchAllPages(ContractTypeDTO typeDTO, Integer currentPage, Integer pageSize);
}
